go build

@REM 默认配置
set FileLog=""
set Address=tcp://127.0.0.1:9527
set WSPath=""
set WSSCertPath=""
set WSSKeyPath=""
set ClientCount=20
set MessageRepeat=10240

@REM call :config_tcp
@REM call :config_udp
call :config_ws
@REM call :config_wss

start "Server" test.exe -Mode="Server" -LogFilePath=%FileLog% -LogLevel="Info" -Address=%Address% -WSPath=%WSPath% -WSSCertPath=%WSSCertPath% -WSSKeyPath=%WSSKeyPath%
timeout /T 1 /NOBREAK

start "Client" test.exe -Mode="Client" -LogFilePath=%FileLog% -LogLevel="Info" -Address=%Address% -WSPath=%WSPath% -WSSCertPath=%WSSCertPath% -WSSKeyPath=%WSSKeyPath% -ClientCount=%ClientCount% -MessageRepeat=%MessageRepeat%
timeout /T 1 /NOBREAK

@REM pause

@REM tcp配置
:config_tcp
set Address=tcp://127.0.0.1:9527
goto:eof

@REM udp配置
:config_udp
set Address=udp://127.0.0.1:9527
goto:eof

@REM ws配置
:config_ws
set Address=ws://127.0.0.1:9527
set WSPath="/ws"
goto:eof

@REM wss配置
:config_wss
set Address=wss://127.0.0.1:9527
set WSPath="/wss"
set WSSCertPath="./server.crt"
set WSSKeyPath="./server.key"
goto:eof